package com.ch01.ex25;

/**
 * Created by zc on 2016/1/27.
 */
public class Task1 implements Runnable{

    private NumberObj numberObj;

    public Task1(NumberObj numberObj) {
        this.numberObj = numberObj;
    }

    @Override
    public void run() {
        try {
            wait();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        numberObj.add();
        notifyAll();
    }
}
